package com.untour.seqid.config.leaf.segment.schedule;

import java.util.concurrent.ThreadFactory;

public class UpdateThreadFactory implements ThreadFactory {

    private static int threadInitNumber = 0;

    private static synchronized int nextThreadNum() {
        return threadInitNumber++;
    }

    @Override
    public Thread newThread(Runnable r) {
        return new Thread(r, "Thread-Segment-Update-" + nextThreadNum());
    }
}